package com.jt.consumer.service;


import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;

@Component
public class RemoteProviderFallBackFactory
        implements FallbackFactory<RemoteProviderService> {

    @Override
    public RemoteProviderService create(Throwable cause) {
        return new RemoteProviderService() {
            @Override
            public String echoMessage(String string) {
                return "系统维护中，请稍后。。。";
            }
        };
    }
}
